<template>
  <h2>{{ msg }} - 演示组件</h2>
  <em>counter: {{ counter }}</em>
</template>

<script setup>
// 组件内定义 props
// const props = defineProps([ 'msg', 'counter' ])
const props = defineProps({
  // msg: String,
  msg: {
    type: String,
    default: '默认的标题'
  },
  // counter: Number,
  counter: {
    type: Number,
    required: true
  },
})
// console.log("props: ", props)
// console.log(props.msg)
// console.log(props.counter)

</script>
